home *** CD-ROM | disk | FTP | other *** search
/ Armageddon - Interactive Preview / Interactive Preview: Armageddon.iso / pc / control.dxr / Scripts & Behaviors_28_Random Numbers Behavior.ls < prev    next >
Encoding:
Text File  |  1998-05-19  |  363 b   |  14 lines

  1. property pThisSprite, pStartCast, pCounter
  2.  
  3. on new me
  4.   set pThisSprite to the currentSpriteNum
  5.   set the member of sprite pThisSprite to "random numbers 1"
  6.   set pStartCast to the memberNum of sprite pThisSprite
  7.   set pCounter to 0
  8. end
  9.  
  10. on exitFrame me
  11.   set randomValue to random(3) - 1
  12.   set the memberNum of sprite pThisSprite to pStartCast + randomValue
  13. end
  14.